package org.fly.service;

import org.fly.bean.Product;
import org.fly.bean.query.ProductQuery;
import org.fly.bean.common.BusinessException;
import org.fly.bean.query.ProductStatisticsQuery;
import org.fly.bean.warpper.BaseStatistics;
import org.fly.bean.warpper.ProductPriceWarpper;
import org.fly.bean.warpper.ProductWarpper;

import java.util.List;

/**
* Created by autoCode on 2018-01-29 16:38:01.
*/
public interface ProductService {

    List<Product> list(ProductQuery query);

    List<ProductWarpper> listWarpper(ProductQuery query);

    long count(ProductQuery query);

    Product findById(String id);

    void save(Product bean)  throws BusinessException;

    void delete(String id);

    List<BaseStatistics> statistics(ProductStatisticsQuery query);

    ProductPriceWarpper find(String productId,String customerId);
}
